//用户登出
var home = function() {		
	window.location.href = 'Home.do';
}

//刷新页面
var flush = function() {
	//刷新当前活动的Tab
	Ext.getCmp("center_part").getActiveTab().getUpdater().refresh();
}

//用户登出
var leave = function() {
	Ext.Msg.confirm("友情提醒", "您确定要退出吗？", function(btn) {
		if (btn=='yes') {
			window.location.href = 'loginOut.do';
		} 
	});
}

//显示更换皮肤的ComboBox
var changeSkin = function() {
	var combo = new Ext.form.ComboBox({
		id: 'chgSkin',
		name: 'skin',
		width: 80,
		hiddenName: 'skinChg',
		store: new Ext.data.SimpleStore({
	        fields: ['value', 'text'],
	        data: [
		        ['ext-all','默认皮肤'],
		        ['xtheme-gray','灰色回忆'],
		        ['xtheme-olive','绿色芳香'],
		        ['xtheme-purple','紫色心情'],
		        ['xtheme-slate','深蓝晴空'],
		        ['xtheme-slickness','黑色物语']
		    ]
	    }),
	    emptyText: '默认风格',
        mode: 'local',
        triggerAction: 'all',								            
        valueField: 'value',
        displayField: 'text',
        //不允许用户填写
        readOnly: true,
        listeners: {
        	select: function(combo, record, index) {
        		Ext.util.CSS.swapStyleSheet('theme', 'EXT/resources/css/' + combo.getValue() + '.css');
        	}
        }
	});
	combo.render("changeSkin");
}